package com.qf.service.Impl;
import com.qf.entity.UserAddress;
import com.qf.entity.UserAddressDTO;
import com.qf.mapper.UserAddressMapper;
import com.qf.service.UserAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * --- 包的 ---
 *
 * @author ding
 * @date 2025/5/4
 * @desc
 */
@Service
public class UserAddressServiceImpl implements UserAddressService {
    @Autowired
    private  UserAddressMapper userAddressMapper;
    @Override
    public List<UserAddress> findAllAddress(UserAddressDTO userAddressDTO) {
        return userAddressMapper.findAllAddress(userAddressDTO);
    }

    @Override
    public boolean deleteAddress(int id) {
        return userAddressMapper.deleteAddress(id);
    }

    @Override
    public boolean updateAddress(UserAddress userAddress) {
        return userAddressMapper.updateAddress(userAddress);
    }

    @Override
    public boolean batchDeleteAddress(List<Integer> ids) {
        return userAddressMapper.batchDeleteAddress(ids);
    }

    @Override
    public boolean addAddress(UserAddress userAddress) {
        return userAddressMapper.addAddress(userAddress);
    }
}
